(function() {
  app.controller('notice_detailCtrl', function($rootScope, $scope, $state, $http) {
    $scope.notice = $state.params.notice;
    $scope.init = function() {
      $http
        .get('../static/notice/' + $scope.notice.notice_id)
        .then(function(xhr) {
          $scope.notice.content = xhr.data;
        });
    };
  });

  app.filter('sceHtml', function($sce) {
    return function(input) {
      if (input) {
        return $sce.trustAsHtml(input);
      }
    };
  });
})();
